home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / util / cdity / ModeProSrc.lha / Prefs / PrintPaletteStr.c < prev    next >
C/C++ Source or Header  |  1998-08-22  |  3KB  |  84 lines

  1. #include <stdio.h>
  2. #include "mpp.h"
  3. #include "mppexterns.h"
  4.  
  5. /*
  6. STRPTR Locales[]=
  7. {
  8.   "deutsch.language",
  9.   "polski.language",
  10.   "svenska.language",
  11.   "russian.language",
  12.   "español.language",
  13.   "türkçe.language",
  14.   "português-brasil.language",
  15.   "italiano.language",
  16.   "dansk.language",
  17.   "ÃeÓtina.language",
  18.   "Hrvatski.language",
  19.   "srpski.language",
  20.   "norsk.language",
  21.   "íslenska.language",
  22.   "français.language",
  23.   0
  24. };
  25.  
  26.  
  27. void PrintPStrings(void)
  28. {
  29.   FILE *fp;
  30.   struct Catalog *Catalog;
  31.   STRPTR *loc=Locales;
  32.   UBYTE fname[256];
  33.   APTR locale;
  34.   
  35.   
  36.   while(*loc)
  37.   {
  38.     printf("locale %s\n",*loc);
  39.     
  40.     if(locale=OpenLocale(*loc))
  41.     {
  42.     (Catalog=OpenCatalog(locale,(STRPTR)"modeproprefs.catalog", TAG_DONE));
  43.     {
  44.       strcpy(fname,"ram:");
  45.       strcat(fname,*loc);
  46.       strcat(fname,".ct");
  47.  
  48.       printf("%s\n",fname);
  49.       
  50.       if(fp=fopen(fname,"w"))
  51.       {
  52.         fprintf(fp,"## version $VER: Palette_Requester.catalog 1.0 (98.09.01)\n");
  53.         fprintf(fp,"## language %s\n",*loc);
  54.         fprintf(fp,"## codeset 0\n");
  55.         fprintf(fp,";\nMSG_MENU_PROJECT\n%s\n",GetCatalogStr(Catalog,MSG_M_PROJECT,GetString(MSG_M_PROJECT)));
  56.         fprintf(fp,";\nMSG_MENU_LOADPALETTE\n%s\n",GetCatalogStr(Catalog,MSG_PRM_LOADPALETTE,GetString(MSG_PRM_LOADPALETTE)));
  57.         fprintf(fp,";\nMSG_MENU_LOADPALETTE_KEY\n%s\n",GetCatalogStr(Catalog,MSG_PRM_LOADPALETTE_KEY,GetString(MSG_PRM_LOADPALETTE_KEY)));
  58.         fprintf(fp,";\nMSG_MENU_SAVEPALETTE\n%s\n",GetCatalogStr(Catalog,MSG_PRM_SAVEPALETTE,GetString(MSG_PRM_SAVEPALETTE)));
  59.         fprintf(fp,";\nMSG_MENU_SAVEPALETTE_KEY\n%s\n",GetCatalogStr(Catalog,MSG_PRM_SAVEPALETTE_KEY,GetString(MSG_PRM_SAVEPALETTE_KEY)));
  60.         fprintf(fp,";\nMSG_MENU_OK\n%s\n",GetCatalogStr(Catalog,MSG_PRM_OK,GetString(MSG_PRM_OK)));
  61.         fprintf(fp,";\nMSG_MENU_OK_KEY\n%s\n",GetCatalogStr(Catalog,MSG_PRM_OK_KEY,GetString(MSG_PRM_OK_KEY)));
  62.         fprintf(fp,";\nMSG_MENU_CANCEL\n%s\n",GetCatalogStr(Catalog,MSG_PRM_CANCEL,GetString(MSG_PRM_CANCEL)));
  63.         fprintf(fp,";\nMSG_MENU_CANCEL_KEY\n%s\n",GetCatalogStr(Catalog,MSG_PRM_CANCEL_KEY,GetString(MSG_PRM_CANCEL_KEY)));
  64.         fprintf(fp,";\nMSG_GAD_OK\n%s\n",GetCatalogStr(Catalog,MSG_PRG_OK,GetString(MSG_PRG_OK)));
  65.         fprintf(fp,";\nMSG_GAD_CANCEL\n%s\n",GetCatalogStr(Catalog,MSG_PRG_CANCEL,GetString(MSG_PRG_CANCEL)));
  66.         fprintf(fp,";\nMSG_GAD_RED\n%s\n",GetCatalogStr(Catalog,MSG_PRG_RED,GetString(MSG_PRG_RED)));
  67.         fprintf(fp,";\nMSG_GAD_GREEN\n%s\n",GetCatalogStr(Catalog,MSG_PRG_GREEN,GetString(MSG_PRG_GREEN)));
  68.         fprintf(fp,";\nMSG_GAD_BLUE\n%s\n",GetCatalogStr(Catalog,MSG_PRG_BLUE,GetString(MSG_PRG_BLUE)));
  69.         fprintf(fp,";\nMSG_GAD_RESET\n%s\n",GetCatalogStr(Catalog,MSG_PRG_RESET,GetString(MSG_PRG_RESET)));
  70.         fprintf(fp,";\nMSG_GAD_UNDO\n%s\n",GetCatalogStr(Catalog,MSG_PRG_UNDO,GetString(MSG_PRG_UNDO)));
  71.         fprintf(fp,";\nMSG_GAD_COPY\n%s\n",GetCatalogStr(Catalog,MSG_PRG_COPY,GetString(MSG_PRG_COPY)));
  72.         fprintf(fp,";\nMSG_GAD_SWAP\n%s\n",GetCatalogStr(Catalog,MSG_PRG_SWAP,GetString(MSG_PRG_SWAP)));
  73.         fprintf(fp,";\nMSG_GAD_SPREAD\n%s\n",GetCatalogStr(Catalog,MSG_PRG_SPREAD,GetString(MSG_PRG_SPREAD)));
  74.         fprintf(fp,";\nMSG_GAD_PALETTE\n%s\n",GetCatalogStr(Catalog,MSG_PRG_PALETTE,GetString(MSG_PRG_PALETTE)));
  75.         fclose(fp);
  76.       }
  77.       CloseCatalog(Catalog);
  78.     }
  79.     CloseLocale(locale);
  80.     }
  81.     loc++;
  82.   }
  83. }
  84. */